package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class DVDTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class DVDTest
{
    /**
     * Default constructor for test class DVDTest
     */
    public DVDTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }
  

    @Test
    public void testSetId()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        dVD1.setId(2);
        assertEquals(2, dVD1.getId());
    }

    @Test
    public void testGetId()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        assertEquals(1, dVD1.getId());
    }
    
    
    
    @Test
    public void testSetTitle()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        dVD1.setTitle("Quest");
        assertEquals("Quest", dVD1.getTitle());
    }

    @Test
    public void testGetTitle()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        assertEquals("Rocky", dVD1.getTitle());
    }    

    @Test
    public void testSetArtist()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        dVD1.setArtist("Jean-Claude Van Damme");
        assertEquals("Jean-Claude Van Damme", dVD1.getArtist());
    }




    @Test
    public void testGetArtist()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        assertEquals("Stalone", dVD1.getArtist());
    }

    @Test
    public void testSetPublicationDate()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        dVD1.setPublicationDate(1980);
        assertEquals(1980, dVD1.getPublicationDate());
    }

    @Test
    public void testGetPublicationDate()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD(1, "Rocky", "Stalone", 1976);
        assertEquals(1976, dVD1.getPublicationDate());
    }


    @Test
    public void testGetDVDInfo()
    {
        ModelLayer.DVD dVD1 = new ModelLayer.DVD ();
        dVD1.setId(1);
        dVD1.setTitle("Rocky");
        dVD1.setArtist("Stalone");
        dVD1.setPublicationDate(1976);
        assertEquals(1976,dVD1.getPublicationDate());
        assertEquals("Stalone",dVD1.getArtist()) ;
        assertEquals("Rocky", dVD1.getTitle()) ;
        assertEquals(1,dVD1.getId());
    }

        
    
    






}








